import request from '@/utils/request'

export function getFirstListPage(params) {
    return request({
        url: '/operate/pro_cat/cat__big_list_page',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
            'pageNum': params.pageNum,
            'pageSize': params.pageSize
        },
        method: 'get',
        params: params
    })
}

export function createProCat(params) {
    return request({
        url: '/operate/pro_cat/cat_save',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'post',
        data: params
    })
}

export function deleteProCat(params) {
    return request({
        url: '/operate/pro_cat/cat_delete',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
        params: params
    })
}


export function getCatListOrigin() {
    return request({
        url: '/operate/pro_cat/cat_list_orign',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get'
    })
}

// 获取二级分类
export function getSecondListPage(params) {
    return request({
        url: '/operate/pro_cat/sub_cat_list',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
            'pageNum': params.pageNum,
            'pageSize': params.pageSize
        },
        method: 'get',
        params: params
    })
}

// 查询所有分类
export function getAllCat(params) {
    return request({
        url: '/operate/pro_cat/cat_info2',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'get',
        params: params
    })
}